<div class="form">
    <?php
    $form = $this->beginWidget('GxActiveForm', array(
        'id' => 'aman-article-form',
        'enableAjaxValidation' => false,
        'htmlOptions' => array('enctype' => 'multipart/form-data'),
    ));
    ?>

    <p class="innerError note">
        <?php echo Yii::t('app', 'Fields with'); ?> <span class="required">*</span> <?php echo Yii::t('app', 'are required'); ?>.
        
    </p>

    <div class="row">
        <div class="rowLabel"><?php echo $form->labelEx($model, 'title'); ?>
        </div>
        <div class="rowControl"><?php echo $form->textField($model, 'title', array('maxlength' => 145, 'class' => 'form-control')); ?>
            <?php echo $form->error($model, 'title'); ?>
        </div><!-- row -->
    </div>

    <div class="row">
        <div class="rowLabel"><?php echo $form->labelEx($model, 'description'); ?>
        </div>
        <div class="rowControl">
            <?php
            $this->widget('application.extensions.ckeditor.CKEditor', array(
                'model' => $model,
                'attribute' => 'description',
                'editorTemplate' => 'full',
            ));
            ?>
            <?php echo $form->error($model, 'description'); ?>
        </div><!-- row -->
    </div>

    <div class="row" style="margin-bottom: 10px;">
        <div class="rowLabel"><?php echo $form->labelEx($model, 'photo_name'); ?></div>
        <div class="rowControl"><?php echo $form->fileField($model, 'photo_name', array('class' => 'btn')); ?>
            <?php echo $form->error($model, 'photo_name'); ?>
        </div><!-- row -->
    </div>
    <?php if (!$model->isNewRecord) { ?>

        <div class="row" style="margin-bottom: 10px;">
            <div class="rowLabel">&nbsp;</div>
            <div class="rowControl"><img src="<?php echo Yii::app()->request->baseUrl . '/upload/article-image/' . $model->photo_name; ?>"/>
            </div><!-- row -->
        </div>
    <?php } ?>
    <div class="row">
        <?php
        echo GxHtml::submitButton(Yii::t('app', 'Save'), array('class' => 'read-more pull-left'));
        $this->endWidget();
        ?>
    </div>
</div>
<!-- form -->
<div class="gap"></div>
<div class="gap"></div>  

</div>
<div class="col-lg-2"></div>


</div>
</div>
</div>
</div>

</div>
</section>
<div class="gap"></div>
<div class="gap"></div>